﻿<UserControl x:Class="Microsoft.Samples.Kinect.WpfViewers.KinectDiagnosticViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:kt="clr-namespace:Microsoft.Samples.Kinect.WpfViewers"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <WrapPanel Orientation="Horizontal">
        <StackPanel>
            <TextBlock FontSize="12" Text="Color Image" HorizontalAlignment="Center"/>
            <Image Name="kinectColorImage" Width="640" Height="480" MouseLeftButtonDown="kinectColorImage_MouseLeftButtonDown" />
            <TextBlock FontSize="36" HorizontalAlignment="Center" Name="PointColorPersentage" Text="Please Pick A Point" />
        </StackPanel>
        <StackPanel>
            <TextBlock FontSize="12" Text="Depth Image" HorizontalAlignment="Center"/>
            <Image Name="kinectDepthImage" Width="640" Height="480" MouseLeftButtonDown="kinectDepthImage_MouseLeftButtonDown" />
            <TextBlock FontSize="36" HorizontalAlignment="Center" Name="PointDepthPersentage" Text="Please Pick A Point" />
        </StackPanel>
        <StackPanel Orientation="Vertical" Width="200">
            <TextBlock FontSize="12" HorizontalAlignment="Center" >Framerate</TextBlock>
            <StackPanel Orientation="Vertical" TextBlock.Foreground="White" Background="Black">
                <TextBlock FontSize="72" Name="frameRate" HorizontalAlignment="Center"
                           Text="{Binding ElementName=kinectDiagnosticViewer,Path=FrameRate}" />
                <TextBlock FontSize="18" HorizontalAlignment="Center">FPS</TextBlock>
            </StackPanel>
        </StackPanel>
        <StackPanel Orientation="Vertical" Width="200">
            <Label Content="Label" FontSize="36" Name="labelAngle" HorizontalAlignment="Center" />
            <Slider Height="23" Name="sliderAngle" Width="200" Minimum="-27" Maximum="27" 
                    Value="-10" IsSnapToTickEnabled="True"
                    TickFrequency="1" ValueChanged="sliderAngle_ValueChanged"
                    LostMouseCapture="sliderAngle_LostMouseCapture"/>
            <Label Content="" Height="28" Name="labelTmp" />
        </StackPanel>
        <StackPanel Orientation="Vertical" Width="200">
            <Button Content="计算平面" Name="btnCalcPlane" Click="btnCalcPlane_Click"/>
            <TextBlock Name="textPlane" Text="TAT"/>
        </StackPanel>
    </WrapPanel>
</UserControl>
